import request from './request'

/**
 * kind页全部数据接口
 */
export function getAllProduct (params) {
  return request({
    url: '/getAllProduct',
    method: 'get',
    params
  })
}
/**
 * 首页获取全部推荐日记
 */
export function getAllDiary (params) {
  return request({
    url: '/getAllDiary',
    method: 'get',
    params
  })
}
/**
 * 首页推荐日记详情
 */
export function getDiaryById (params) {
  return request({
    url: '/getDiaryById',
    method: 'get',
    params
  })
}
/**
 * kind页跳转商品详情接口
 */
export function getProductById (params) {
  return request({
    url: '/getProductById',
    method: 'get',
    params
  })
}
/**
 * 登录获取短信验证码
 */
export function getSendCode (params) {
  return request({
    url: '/getCheckCode',
    method: 'get',
    params
  })
}
/**
 * 验证码登录接口
 */
export function getLogin (params) {
  return request({
    url: '/login',
    method: 'get',
    params,
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded'
    }
  })
}
/**
 * 一键登录接口
 */
export function getOneLogin (params) {
  return request({
    url: '/oneLogin',
    method: 'get',
    params
  })
}
/**
 * 获取个人信息
 */
export function getUserMessage (params) {
  return request({
    url: '/queryMsg',
    method: 'get',
    params
  })
}
/**
 * 修改个人信息
 */
export function changeUserMessage (params) {
  return request({
    url: '/changeMsg',
    method: 'post',
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'
    },
    data: params
  })
}
/**
 * 确认订单
 */
export function submitOrder (params) {
  return request({
    url: '/submitOrder',
    method: 'get',
    params
  })
}
/**
 * 支付订单
 */
export function payOrder (params) {
  return request({
    url: '/ModifyOrder',
    method: 'get',
    params
  })
}
/**
 * 删除订单
 */
export function delOrder (params) {
  return request({
    url: '/delOrder',
    method: 'get',
    params
  })
}
/**
 * 查询单个订单
 */
export function getOrderDetail (params) {
  return request({
    url: '/getOrderByCon',
    method: 'get',
    params
  })
}
/**
 * 获取直播页面轮播图数据
 */
export function getVideoBannerList (params) {
  return request({
    url: '/videoBanner',
    method: 'get',
    params
  })
}
/**
 * 获取直播页面分类数据
 */
export function getVideoKindList (params) {
  return request({
    url: '/videoKindList',
    method: 'get',
    params
  })
}
/**
 * 获取直播页面分类详情数据
 */
export function getVideoKindProDetailList (params) {
  return request({
    url: '/videoKindListProDetail',
    method: 'get',
    params
  })
}
/**
 * 医疗百科详情
 */
export function getMedicalDetail (params) {
  return request({
    url: '/encyclopediaListProDetail',
    method: 'get',
    params
  })
}
/**
 * 获取所有医疗百科
 */
export function getMedical () {
  return request({
    url: '/encyclopediaList',
    method: 'get'
  })
}
/**
 * 获取每日福利全部数据
 */
export function getWelfareList (params) {
  return request({
    url: '/welfareList',
    method: 'get',
    params
  })
}
/**
 * 获取每日福利详情数据
 */
export function getWelfareProDetailList (params) {
  return request({
    url: '/welfareListProDetail',
    method: 'get',
    params
  })
}

/**
 * 模糊搜索
 */
export function getSearch (params) {
  return request({
    url: '/search',
    method: 'get',
    params
  })
}

/**
 * 潮流风尚--全部
 */
export function tidewayList () {
  return request({
    url: '/tidewayList',
    method: 'get'
  })
}

/**
 * 潮流风尚--单个详情
 */
export function tidewayListProDetail (params) {
  return request({
    url: '/tidewayListProDetail',
    method: 'get',
    params
  })
}

/**
 *  获取用户订单,参数：用户id
 */
export function getOrder (params) {
  return request({
    url: '/getAllOrder',
    method: 'get',
    params
  })
}

/**
 * 获取全部通知
 */
export function getInform () {
  return request({
    method: 'get',
    url: '/getAllNotice'
  })
}

/**
 * 获取通知详情，参数message_id
 */
export function informDetail (params) {
  return request({
    url: '/getNoticeById',
    method: 'get',
    params
  })
}

/**
 * 获取评论,参数type="通知||日记",username
 */
export function getComment (params) {
  return request({
    url: '/getCommentByTy',
    method: 'get',
    params
  })
}
/**
 * 领取优惠卷
 */
export function getMyCoupons (params) {
  return request({
    url: '/mycoupons',
    method: 'get',
    params
  })
}
/**
 * 优惠券查询
 */
export function queryMyCoupons (params) {
  return request({
    url: '/userCoupons',
    method: 'get',
    params
  })
}
/**
 * 商品收藏接口
 */
export function getCollectPro (params) {
  return request({
    url: '/productChange',
    method: 'get',
    params
  })
}
/**
 * 日记点赞收藏接口
 */
export function getDiaryCollect (params) {
  return request({
    url: '/diaryChange',
    method: 'get',
    params
  })
}
/**
 * 通知点赞收藏接口
 */
export function getNoticeCollect (params) {
  return request({
    url: '/noticeChange',
    method: 'get',
    params
  })
}
/**
 * 查看用户点赞列表(通知,日记)
 */
export function getUserLike (params) {
  return request({
    url: '/personLike',
    method: 'get',
    params
  })
}
/**
 * 查看用户收藏列表(通知,日记,商品)
 */
export function getUserCollect (params) {
  return request({
    url: '/personCollect',
    method: 'get',
    params
  })
}
/**
 * 查看用户评论列表(通知,日记)
 */
export function getCommentByTy (params) {
  return request({
    url: '/getCommentByTy',
    method: 'get',
    params
  })
}
/**
 * 日记评论
 */
export function addDiaryComment (params) {
  return request({
    url: '/addDiaryComment',
    method: 'post',
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'
    },
    data: params
  })
}
/**
 * 通知评论
 */
export function addNoticeComment (params) {
  return request({
    url: '/addNoticeComment',
    method: 'post',
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'
    },
    data: params
  })
}
